package com.alibaba.algo.exception;

import lombok.Getter;

/**
 * @author Fan.tianpeng
 * @date 2021/4/27 16:43
 */
@Getter
public enum SysRoleErrorCode {

    ROLE_NAME_REPEAT(20400, "角色名称已被占用"),
    ROLE_CODE_REPEAT(20401, "角色编码已被占用"),
    CAN_NOT_DELETE(20402, "当前角色[{0}]下还有员工或组织,不允许删除"),
    ROLE_DESC_IS_TOO_LONG(20403, "角色描述过长"),
    ORG_ROLE_NEED_ORG(20404, "当前组织角色[{0}]需要指定适用的组织"),
    ROLE_ID_IS_ILLEGAL(20405,"角色id参数不合法"),
    ROLE_ID_AND_ROLE_CODE_IS_NULL(20406, "角色id和code不能同时为空")
    ;

    private Integer code;

    private String message;

    SysRoleErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
